from transfer.client import client
from transfer.common import KeepTimer
from time import sleep

def print_info():
    print(client.remote.get_info('>Python'))

kp = KeepTimer()
# 启动后台线程，间隔2秒调用一次print_info()
kp.start_back(print_info, 2)
sleep(10) # 主线程等待10秒
kp.stop_back() # 主线程停止子线程